package com.ygswglxt.attendance.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.util.Date;

@Data
@TableName("attendance_record")
public class AttendanceRecord {
    @TableId(type = IdType.AUTO)
    private Long id;
    private Long userId;
    @TableField(exist = false)
    private String userName; // 员工名称（联表查询字段，不在数据库表中）
    private Date checkInTime;
    private Date checkOutTime;
    private String type; // CHECK_IN, CHECK_OUT, OVERTIME
    private java.math.BigDecimal hours; // 加班时长（小时）
    private Date overtimeDate; // 加班日期
    private String reason; // 加班原因
    private String status; // PENDING, APPROVED, REJECTED
    private Boolean isLate; // 是否迟到
    private Boolean isEarlyLeave; // 是否早退
    private Boolean isAbsent; // 是否缺勤
    private Integer lateMinutes; // 迟到分钟数
    private Integer earlyLeaveMinutes; // 早退分钟数
    private Date attendanceDate; // 考勤日期
    private String exceptionReason; // 异常原因
    private String exceptionStatus; // 异常处理状态：UNHANDLED-未处理, HANDLED-已处理, IGNORED-已忽略
    private Long exceptionHandlerId; // 异常处理人ID
    private Date exceptionHandleTime; // 异常处理时间
    private String exceptionHandleRemark; // 异常处理备注
    private Date createTime;
}

